getting @Autowired fields to work with ConstraintValidators in spring boot

George Opritescu
1 min readDec 14, 2017

--

While working on a class that implements ConstraintValidator, I needed to @Autowire a field, but it kept being null. The following made it work:

validator configuration

--

--